﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using System.Web.UI.HtmlControls;

namespace IronOne.SalesOne.SalesOneWeb
{
    public class SOBasePage : System.Web.UI.Page
    {
        //ScriptManager mgr = new ScriptManager();

        //protected void registerControls()
        //{
        //    this.Form.Controls.Add(mgr);
        //}

        protected void MassageSummery(string msg)
        {
            HtmlTable cell = (HtmlTable)this.Master.FindControl("msgTable");
            Label Msg = (Label)cell.FindControl("MasterMsg");

            if (msg != null)
            {
                //string msgString = ConfigurationSettings.AppSettings[msg];
                Msg.Text = ConfigurationSettings.AppSettings[msg];

                if (msg.Substring(3, 1) == "4")
                    cell.Attributes.Add("class", "success");
                else
                    cell.Attributes.Add("class", "error");
            }
        }
    }
}
